#include <stdio.h>
#define N 5
int main() {
    int a[N]={1,2,3,4,5};
    int *p;
    p=a;

    for (int i = 0; i <N; i++)
    {
        printf("%3d",*(p+i));//这里写a[i]是等价的，注意指针加减1是增加减少4个字节
    }
    printf("\n----------------\n");
    p=&a[4];
    for (int i = 0; i <N; i++)
    {
        printf("%3d",*(p-i));//这里写a[i]是等价的
    }

    return 0;
}
